3a4e57a149c8610035879cdfb9c7e3fd6afe89c5,clc/modules/storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/BlockStorage.java,BlockStorage,DeleteStorageVolume,#DeleteStorageVolumeType#,242
Before Change
volumeInfo.setVolumeId(volumeId);
List<VolumeInfo> volumeList = db.query(volumeInfo);
reply.set_return(Boolean.FALSE);
if(volumeList.size() > 0) {
VolumeInfo foundVolume = volumeList.get(0);
//check its status
String status = foundVolume.getStatus();
if(status.equals(StorageProperties.Status.available.toString()) || status.equals(StorageProperties.Status.failed.toString())) {
VolumeDeleter volumeDeleter = new VolumeDeleter(volumeId);
volumeService.add(volumeDeleter);
reply.set_return(Boolean.TRUE);
}
}
db.commit();
After Change
List<VolumeInfo> volumeList = db.query(volumeInfo);
//always return true.
reply.set_return(Boolean.TRUE);
if(volumeList.size() > 0) {
VolumeInfo foundVolume = volumeList.get(0);
//check its status